
//基础公共url
var baseUrl = '.'
//基础组件库
export default {
  "label": '图表',
  "icon": 'icon-bar',
  "children": [{
    "label": '通用型',
    "option": {
      "name": "通用型",
      "title": "通用型",
      "icon": 'icon-bar',
      "img": require('@/assets/text5.png'),
      "dataType": 1,
      "dataMethod": 'get',
      "data": {
        "categories": [
          "苹果",
          "三星",
          "小米",
          "oppo",
          "vivo"
        ],
        "series": [{
          "name": "手机品牌",
          "data": [
            1000879,
            3400879,
            2300879,
            5400879,
            3400879
          ]
        }]
      },
      "echartFormatter": "(data)=>{\nconsole.log(data);\nreturn {\n            title: {\n\t\t\t\t textStyle: {\n\t\t\t\t\tfontWeight: 'normal',      \n\t\t\t\t\tcolor: '#fff'\n\t\t\t\t},\n                text: 'ECharts 入门示例'\n            },\n            tooltip: {},\n            legend: {\n                data:['销量'],\n\t\t\t\ttextStyle: {\n\t\t\t\t\tfontWeight: 'normal',      \n\t\t\t\t\tcolor: '#fff'\n\t\t\t\t},\n            },\n            xAxis: {\n                data: [\'衬衫\',\'羊毛衫\',\'雪纺衫\',\'裤子\',\'高跟鞋\',\'袜子\']\n            },\n            yAxis: {},\n            series: [{\n                name: '销量',\n                type: 'bar',\n                data: [5, 20, 36, 10, 10, 20]\n            }]\n        };\n}",
      "dataFormatter": "",
      "stylesFormatter": "",
      "url": baseUrl + "/bar",
      "time": 5000,
      "component": {
        "width": 600,
        "height": 300,
        "name": "common",
        "prop": "common",
      },
      option: {
        "nameColor": "#eee",
        "lineColor": "#eee",
        "barColor": [{
          "color1": "#83bff6",
          "color2": "#188df0",
          "postion": 90,
          "$index": 0,
          "_show": true
        }, {
          "color1": "#23B7E5",
          "color2": "#564AA3",
          "postion": 50,
          "$index": 1,
          "_show": true
        }],
      }
    }
  }, {
    "label": 'datav',
    "option": {
      "name": "datav",
      "title": "datav",
      "icon": 'icon-bar',
      "img": require('@/assets/text6.png'),
      "dataType": 0,
      "dataMethod": 'get',
      data: {
        data: [66]
      },
      "dataFormatter": "(data)=>{\n console.log(data);\n return data; \n }",
      "echartFormatter": "(data)=>{\n console.log(data);\n return data; \n }",
      "url": baseUrl + "/bar.json",
      "time": 5000,
      "component": {
        "width": 150,
        "height": 200,
        "name": "datav",
        "prop": "datav",
      },
      "option": {
        "is": 'dv-water-level-pond',
        data: [66],
        shape: 'rect',
        colors: ['#00BAFF', '#3DE7C9'],
        waveNum: 3,
        waveHeight: 40,
        waveOpacity: 0.4,
        formatter: '{value}%'
      }
    }
  }, {
    "label": '柱形图',
    "option": {
      "name": "柱状图",
      "title": "柱状图",
      "icon": 'icon-bar',
      "img": require('@/assets/bar.png'),
      "dataType": 1,
      "dataMethod": 'get',
      "data": {
        "categories": [
          "苹果",
          "三星",
          "小米",
          "oppo",
          "vivo"
        ],
        "series": [{
          "name": "手机品牌",
          "data": [
            1000879,
            3400879,
            2300879,
            5400879,
            3400879
          ]
        }]
      },
      "dataFormatter": "",
      "stylesFormatter": "",
      "url": baseUrl + "/bar.json",
      "time": 5000,
      "component": {
        "width": 600,
        "height": 300,
        "name": "bar",
        "prop": "bar",
      },
      "option": {
        "gridX": 90,
        "gridY": 0,
        "gridX2": 50,
        "gridY2": 0,
        "legend": true,
        "nameColor": "#eee",
        "lineColor": "#eee",
        "xNameFontSize": 16,
        "yNameFontSize": 16,
        "labelShow": true,
        "labelShowColor": '#fff',
        "labelShowFontSize": 14,
        "labelShowFontWeight": 300,
        "yAxisInverse": false,
        "xAxisInverse": false,
        "xAxisShow": true,
        "yAxisShow": true,
        "yAxisNameGap": 15,
        "yAxisNameRotate": 0,
        "xAxisSplitLineShow": false,
        "yAxisSplitLineShow": false,
        "barWidth": 30,
        "barRadius": 8,
        "barColor": [{
          "color1": "#83bff6",
          "color2": "#188df0",
          "postion": 90,
          "$index": 0,
          "_show": true
        }, {
          "color1": "#23B7E5",
          "color2": "#564AA3",
          "postion": 50,
          "$index": 1,
          "_show": true
        }],
        "barMinHeight": 2,
        "tipFontSize": 22
      }
    }
  }, {
    "label": '折线图',
    "option": {
      "name": "折线图",
      "title": "折线图",
      "icon": 'icon-line',
      "img": require('@/assets/line.png'),
      "dataType": 1,
      "dataMethod": 'get',
      "data": {
        "categories": [
          "苹果",
          "三星",
          "小米",
          "oppo",
          "vivo"
        ],
        "series": [{
          "name": "手机品牌",
          "data": [
            1000879,
            3400879,
            2300879,
            5400879,
            3400879
          ]
        }]
      },
      "dataFormatter": "",
      "stylesFormatter": "",
      "url": baseUrl + "/line.json",
      "time": 5000,
      "component": {
        "width": 600,
        "height": 300,
        "name": "line",
        "prop": "line",
      },
      "option": {
        "gridX": 90,
        "gridY": 0,
        "gridX2": 0,
        "gridY2": 0,
        "nameColor": "#eee",
        "lineColor": "#eee",
        "lineWidth": 5,
        "xNameFontSize": 16,
        "yNameFontSize": 16,
        "labelShow": false,
        "labelShowFontSize": 14,
        "labelShowFontWeight": 300,
        "yAxisInverse": false,
        "xAxisInverse": false,
        "xAxisShow": true,
        "yAxisShow": true,
        "xAxisSplitLineShow": false,
        "yAxisSplitLineShow": false,
        "barWidth": 30,
        "barRadius": 8,
        "barColor": [{
          "color1": "#83bff6",
          "color2": "#188df0",
          "postion": 90,
          "$index": 0,
          "_show": true
        }, {
          "color1": "#23B7E5",
          "color2": "#564AA3",
          "postion": 50,
          "$index": 1,
          "_show": true
        }],
        "symbolSize": 6,
        "smooth": true,
        "barMinHeight": 2
      }
    }
  }, {
    label: '饼图',
    option: {
      "name": "饼图",
      "title": "饼图",
      "icon": 'icon-pie',
      "img": require('@/assets/pie.png'),
      "dataType": 1,
      "dataMethod": 'get',
      "time": 5000,
      "url": baseUrl + "/pie.json",
      "data": [{
        "name": "苹果",
        "value": 1000879,
        "url": "http://www.baidu.com"
      }, {
        "name": "三星",
        "value": 3400879,
        "url": "http://www.baidu.com"
      }, {
        "name": "小米",
        "value": 2300879,
        "url": "http://www.baidu.com"
      }, {
        "name": "oppo",
        "value": 5400879,
        "url": "http://www.baidu.com"
      }, {
        "name": "大疆",
        "value": 3000,
        "url": "http://www.baidu.com"
      }, {
        "name": "抖音",
        "value": 2000,
        "url": "http://www.baidu.com"
      }],
      "dataFormatter": "",
      "stylesFormatter": "",
      "resize": false,
      "component": {
        "width": 600,
        "height": 300,
        "name": "pie",
        "prop": "pie",
      },
      "option": {
        "tipColor": "#FFF",
        "tipFontSize": 12,
        "legend": true,
        "legendFontSize": 14,
        "legendPostion": "left",
        "legendOrient": "vertical",
        "labelShow": true,
        "labelShowFontSize": 16,
        "labelShowColor": "",
        "labelShowFontWeight": "normal",
        "barColor": [
          {
            "color1": "#83bff6"
          },
          {
            "color1": "#23B7E5"
          },
          {
            "color1": "rgba(154, 168, 212, 1)"
          },
          {
            "color1": "#188df0"
          },
          {
            "color1": "#564AA3"
          }
        ],
        "titleShow": false,
        "titleColor": "#FFD700",
        "titleFontSize": 20,
        "titlePostion": "center",
        "subTitleColor": "rgba(30, 144, 255, 1)",
        "subTitleFontSize": 20
      }
    }
  }, {
    label: '象形图',
    option: {
      "title": "象形图",
      "name": "象形图",
      "icon": "icon-pictorialBar",
      "img": require('@/assets/bar2.png'),
      "dataType": 1,
      "dataMethod": 'get',
      "time": 5000,
      "url": baseUrl + "/pie.json",
      "data": [{
        "name": "苹果",
        "value": 1000879,
      }, {
        "name": "三星",
        "value": 3400879,
      }, {
        "name": "小米",
        "value": 2300879,
      }, {
        "name": "oppo",
        "value": 5400879,
      }, {
        "name": "大疆",
        "value": 3000,
      }, {
        "name": "抖音",
        "value": 2000,
      }],
      "dataFormatter": "",
      "stylesFormatter": "",
      "component": {
        "width": 600,
        "height": 300,
        "name": "pictorialbar",
        "prop": "pictorialbar",
      },
      "option": {
        symbolSize: 30,
        symbolMargin: 5,
        symbol: '/img/source/source256.png',
        xAxisShow: false,
        yAxisShow: true,
        yAxisShow2: true,
        fontSize: 24,
        color: '#4dffff',
        nameColor: '#564AA3',
        xNameFontSize: '24',
        yNameFontSize: '24',
        gridX: 70,
        gridX2: 120,
        gridY: 30,
        gridY2: 40,
        "tipFontSize": 22
      }
    }
  }, {
    label: '雷达图',
    option: {
      "title": "雷达图",
      "name": "雷达图",
      "icon": "icon-radar",
      "img": require('@/assets/radar.png'),
      "dataType": 1,
      "dataMethod": 'get',
      "time": 5000,
      "url": baseUrl + "/radar.json",
      "data": {
        indicator: [{
          name: '销售',
          max: 6500
        },
          {
            name: '管理',
            max: 16000
          },
          {
            name: '信息技术',
            max: 30000
          },
          {
            name: '客服',
            max: 38000
          },
          {
            name: '研发',
            max: 52000
          },
          {
            name: '市场',
            max: 25000
          }
        ],
        series: [{
          data: [{
            value: [4300, 10000, 28000, 35000, 50000, 19000],
            name: '预算分配（Allocated Budget）'
          },
            {
              value: [5000, 14000, 28000, 31000, 42000, 21000],
              name: '实际开销（Actual Spending）'
            }
          ]
        }]
      },
      "dataFormatter": "",
      "stylesFormatter": "",
      "component": {
        "width": 970,
        "height": 400,
        "name": "radar",
        "prop": "radar",
      },
      "option": {
        width: '100%',
        height: 600,
        titleShow: true,
        title: '各部门开销',
        subtext: '最近一个月',
        titleColor: '#666',
        tipBackgroundColor: 'rgba(50,50,50,0.7)',
        tipColor: "#fff",
        shape: 'polygon',
        radius: 75,
        splitNumber: 4,
        radarNameColor: '#fff',
        radarNameSize: 18,
        titleFontSize: 18,
        areaOpacity: 0.3,
        legend: true,
        legendPostion: 'right',
        legendOrient: 'vertical',
        legendFontSize: 12,
        labelShow: false,
        barColor: [{
          color1: '#83bff6',
          color2: '#188df0',
          postion: 90,
        }, {
          color1: '#23B7E5',
          color2: '#564AA3',
          postion: 90,
        }, {
          color1: '#af504c',
          color2: '#4caf50',
          postion: 90
        }]
      },
    }
  }, {
    label: '散点图',
    option: {
      "title": "散点图",
      "name": "散点图",
      "icon": "icon-scatter",
      "img": require('@/assets/scatter.png'),
      "dataType": 1,
      "dataMethod": 'get',
      "time": 5000,
      "url": baseUrl + "/scatter.json",
      "data": [{
        "data": [
          [1, 8.04],
          [2, 6.95]
        ]
      },
        {
          "data": [
            [1, 4.04],
            [2, 3.95]
          ]
        }],
      "dataFormatter": "",
      "stylesFormatter": "",
      "component": {
        "width": 600,
        "height": 300,
        "name": "scatter",
        "prop": "scatter",
      },
      "option": {
        lineSize: 25,
        barColor: [{
          postion: 0.2,
          color1: '#91c7ae'
        },
          {
            postion: 0.8,
            color1: '#63869e'
          },
          {
            postion: 1,
            color1: '#c23531'
          }]
      }
    }
  }, {
    label: '漏斗图',
    option: {
      "title": "漏斗图",
      "name": "漏斗图",
      "icon": "icon-funnel",
      "img": require('@/assets/funnel.png'),
      "dataType": 1,
      "dataMethod": 'get',
      "time": 5000,
      "url": baseUrl + "/funnel",
      "data": [{
        value: 335,
        name: '直接访问'
      },
        {
          value: 310,
          name: '邮件营销'
        },
        {
          value: 234,
          name: '联盟广告'
        }],
      "dataFormatter": "",
      "stylesFormatter": "",
      "component": {
        "width": 400,
        "height": 300,
        "name": "funnel",
        "prop": "funnel",
      },
      "option": {
        legendPostion: 'right',
        legendOrient: 'horizontal',
        legendFontSize: 18,
        gridY: 50,
        gridY2: 20,
        gridX: 50,
        gridX2: 50,
        barColor: [{
          color1: '#83bff6',
          color2: '#188df0',
          postion: 90,
        }, {
          color1: '#23B7E5',
          color2: '#564AA3',
          postion: 90,
        }, {
          color1: '#af504c',
          color2: '#4caf50',
          postion: 90
        }]
      }
    }
  }]
}
